'''
Created on Apr 26, 2011

@author: GSE
'''

import json
import urllib


urlcap = "http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=d9d2ez5audh2df8fgwaxtpy5&q="
urlbottom = "&page_limit=1"
search = "Fight Club"

search = search.replace(" ", "+")
url = urlcap + search + urlbottom

content = urllib.urlopen(url).read()
content = content.replace("\n","")

target = json.loads(content)

print target['movies'][0]



#['ratings']['audience_score'] => for audience score
#['release_dates']['theater'] => Theater release date


